<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<p>
	<c:if test="${not empty supplierList}">
		<table border="1">
			<tr>
				<th>TIN NO.</th>
				<th>SUPPLIER NAME</th>
				<th>ADDRESS</th>
				<th>EMAIL</th>
				<th>CONTACT</th>
				<th>STATUS</th>
				<th>ADDED(MM/YYYY)</th>
				<th>ACTIONS</th>
			</tr>
			<c:forEach var="listValue" items="${supplierList}">
				<tr>
					<td>${listValue.tinNumber}</td>
					<td>${listValue.supplierName}</td>
					<td>${listValue.supplierAddress}</td>
					<td>${listValue.supplierEmailId}</td>
					<td>${listValue.supplierPhoneNumber},
						${listValue.supplierMobileNumber}</td>
					<td>${listValue.supplierActive}</td>
					<td>${listValue.month}/${listValue.year}</td>
					<td><a
						href="<%=request.getContextPath()%>/admin/supplier/editSupplier/${listValue.supplierId}">EDIT</a>&nbsp;
						<c:choose>
							<c:when test="${listValue.supplierActive=='A'}">
								<span id="active"><a
									href="<%=request.getContextPath()%>/admin/supplier/deactivateSupplier/${listValue.supplierId}"
									id="action">DEACTIVATE</a></span>
							</c:when>
							<c:when test="${listValue.supplierActive=='D'}">
								<span id="inactive"><a
									href="<%=request.getContextPath()%>/admin/supplier/activateSupplier/${listValue.supplierId}"
									id="action">ACTIVATE</a></span>
							</c:when>
						</c:choose>
					</td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
</p>